<?php
//sleep(5);
     
    include_once('connection/connection.php');
  	
	if(isset($_REQUEST['load_circle'])){
	$data = array();
	$query = mysql_query("SELECT circle_id,circle_name FROM tbl_lookup_circle WHERE zone_id = '$_REQUEST[load_circle]' AND status = 1");
		echo "<option value='0'>Select Circle:</option>";
		while($data = mysql_fetch_assoc($query)){
			echo "<option value='".$data['circle_id']."'>".$data['circle_name']."</option>";
		}
		unset($data);
		unset($query);
	
	}
	
	if(isset($_REQUEST['load_division'])){
	$data = array();
	$query = mysql_query("SELECT div_id,div_name FROM tbl_lookup_division WHERE circle_id = '$_REQUEST[load_division]' AND status = 1");
		echo "<option value='0'>Select Division:</option>";
		while($data = mysql_fetch_assoc($query)){
			echo "<option value='".$data['div_id']."'>".$data['div_name']."</option>";
		}
		unset($data);
		unset($query);
	
	}
	if(isset($_REQUEST['load_sub_div'])){
	$data = array();
	$query = mysql_query("SELECT sub_div_id,sub_div_name FROM tbl_lookup_sub_division WHERE div_id = '$_REQUEST[load_sub_div]' AND status = 1");
		echo "<option value='0'>Select Division:</option>";
		while($data = mysql_fetch_assoc($query)){
			echo "<option value='".$data['sub_div_id']."'>".$data['sub_div_name']."</option>";
		}
		unset($data);
		unset($query);
	
	}
?>